<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="../../common/common.jsp" %>
<%@ include file="master_pass.jsp" %>
<HTML>
<HEAD>
<title>新建版主信息</title>
<%@ include file="../../common/meta.inc" %>
<link href="css.css" rel="stylesheet" type="text/css">
<base target="_self">
<SCRIPT LANGUAGE="javascript" SRC="${pageContext.request.contextPath}/scripts/common-validator.js"></SCRIPT>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/prototype.js"></script>
<script language="javascript" src="${pageContext.request.contextPath}/scripts/buffalo/buffalo.js"></script>
<script language="javascript">
var END_POINT="${pageContext.request.contextPath}/buffalo";
var buffalo = new Buffalo(END_POINT);
function doSubmit() {

	form = document.theform;
	
	if(!validateForm(form))
		return;
		
    var obj = {};
	obj[Buffalo.BOCLASS] = "com.gouwudai.gobbs.pojo.TbbsClassUser";
	obj.classId=$F('classId');
	obj.userId=$F('userId');
	obj.userType=2;	
    buffalo.remoteCall("classUserServiceAjaxService.save",[obj], function(reply) {
        ajaxSubmit(reply.getResult(),"保存成功！","back");
    });
}

function validateForm(form)
{
    if(!sl_checkChoice(form.classId,"分类/版面")) return false;
    if(!sl_checkChoice(form.userId,"注册用户")) return false;      
    return sl_confirmUpdate();
}
</script>
</HEAD>
<BODY>
<script language="javascript">
  setTitle("版面管理","新建版主信息");
</script>
<form name="theform" method="post" action="">
	<table class="bluetable" width="100%">							
		<tr>
         <th colspan="2" align="right">新建版主信息</th>
       	</tr>
		<tr>
			<td class="title" align="right" width="15%">分类/版面:</td>
			<td  width="85%"><select size="1" name="classId" id="classId">					
					<%=Arguments.getAllClassOptions(0)%>
				</select>
			</td>
		</tr>
		<tr>
			<td class="title" align="right" valign="top">注册用户列表:</td>
			<td><select name="userId" id="userId" size="20">					
					<%=Arguments.getActiveUserOptions(0) %>
				</select>								
			</td>
		</tr>																																									
	</table>
	<table class="btntable" width="100%">
		<tr>
			<td>
				<button class="btn" accessKey=s id="btnSave" name="btnSave" onclick="javascript:doSubmit();">保存(<u>S</u>)</button>
				&nbsp;&nbsp;
				<button class="btn" accessKey=c id="btnCancel" name="btnCancel" onclick="javascript:history.back();">取消(<u>C</u>)</button>
				&nbsp;&nbsp;								
			</td>
		</tr>
	</table>
</form>
</BODY>
</HTML>

